package com.dragon.modules.yuegou.mapper.lot;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.dragon.modules.yuegou.entity.lot.ActivityEntity;
import com.dragon.modules.yuegou.model.lot.Activity;
import com.dragon.modules.yuegou.model.lot.ActivityJoin;
import com.dragon.modules.yuegou.model.lot.Prize;
import com.dragon.modules.yuegou.query.lot.AcrivityJoinListQuery;
import com.dragon.modules.yuegou.query.lot.ActivityListQuery;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;
/**
 * 抽奖活动表 Mapper接口
 *
 * @author pbuilder generated
 * @date 2019-10-24 10:22:54
 * @version 2.0
 */
@Component("lotActivityMapper")
public interface ActivityMapper extends BaseMapper<ActivityEntity> {
	
	/**
	 * 分页查询限时活动列表
	 * */
	IPage<Activity> search(IPage<Activity> page,@Param("query")  ActivityListQuery query);
	
	Prize getPrizeInfo(@Param("spuId") String spuId);

	/**
	 * 修改活动状态
	 * */
	void processStatus(@Param("processStatus") String processStatus);

	/**
	 * 获取开奖活动
	 * */
	List<Activity> getRevealList();
	
	/**
	 * 查询会员参与活动信息
	 */
	IPage<ActivityJoin> getActivityJoinInfo(IPage<Activity> page,@Param("query")  AcrivityJoinListQuery query);
	
	/**
	 * 获取中奖券
	 */
	String getPriceCodes(@Param("activityId")  String activityId,@Param("isPrize")  Integer isPrize);
}
